<?php

namespace Service\Http;

class Request
{
    private $method;
    private $path;
    public $middlewareObject;
    public $queryString;
    public $payload;

    public function __construct($method, $path, $queryString, $payload = [])
    {
        $this->method = $method;
        $this->path = $path;
        $this->middlewareObject = [];
        $this->queryString = ($queryString !== null) ? $queryString : [];
        $this->payload = ($payload !== null) ? $payload : [];
    }

    /**
     * @return mixed
     */
    public function getMethod()
    {
        return $this->method;
    }

    /**
     * @return mixed
     */
    public function getPath()
    {
        return $this->path;
    }

    /**
     * @return mixed
     */
    public function getMiddlewareObject()
    {
        return $this->middlewareObject;
    }
}
